<!DOCTYPE html>
<html>
<head>
    <title>{$seo.title}--解决方案</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="解决方案" />
    <meta name="keywords" content="解决方案" />

    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <!-- css -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link href="__HOME__css/iconfont.css" rel="stylesheet"/>
    <link href="__HOME__css/am.css" rel="stylesheet"/>
    <link href="__HOME__css/flexslider.css" rel="stylesheet"/>
    <link href="__HOME__css/style.css" rel="stylesheet"/>
    {$seo.head}
</head>
<body>
{$seo.body}
<div class="wrap">
    <!--导航-->
    {include file="public/header" /}


    <!-- page_banner -->
    <div class="page_banner magtopmenu">
        <div class="pagebanner_pic">
            <ul class="page_banner_slider clear">
                {volist name="banner" id="v" key="k"}
                <li>
                    <div class="pic">
                        <a {if $v.url neq null}href="{$v.url}"{/if}>
                            <img src="{$v.img_url}" alt="{$v.alt}" title="{$v.alt}">
                        </a>
                    </div>
                    <div class="desc">
                        {$v.content}
                    </div>
                </li>
                {/volist}
            </ul>
        </div>
    </div>
    <!-- page_banner end -->

    <!-- position -->
    <div class="position_content">
        <div class="public">
            <div class="position">
                <i class="iconfont icon-zhuye"></i>
                <a href="/">主页</a> >
                <a >解决方案</a>
            </div>
        </div>
    </div>
    <!-- position end -->



    <!-- page -->
    <div class="page_content padtb50">
        <div class="public">
            <div class="singlepro_top">
                <h3 class="title">解决方案</h3>
                <div class="text">概述了使用激光机进行雕刻、切割或者打标的典型行业与应用，选择标签了解其详情:</div>
            </div>

            <div class="application_list">

                <ul class="filter_menu clear">
                    <li class="fl">
                        <select data-sortOrder onchange="_application(this)" data-index="type1">
                            <option value="0" data-filter="0" style="display: none;"> 材料</option>
                            <option value="0" data-filter="0"> 显示全部</option>
                            <?php foreach($type as $val):?>
                                <?php if($val['type'] == 1):?>
                                    <option value="<?php echo $val['id'];?>" data-filter="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
                                <?php endif;?>
                            <?php endforeach;?>
                        </select>
                    </li>
                    <li class="fl">
                        <select data-sortOrder onchange="_application(this)" data-index="type2">
                            <option value="0" data-filter="0" style="display: none;"> 行业</option>
                              <option value="0" data-filter="0"> 显示全部</option>
                            <?php foreach($type as $val):?>
                                <?php if($val['type'] == 2):?>
                                    <option value="<?php echo $val['id'];?>" data-filter="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
                                <?php endif;?>
                            <?php endforeach;?>
                        </select>
                    </li>
                    <li class="fl">
                        <select data-sortOrder onchange="_application(this)" data-index="type3">
                            <option value="0" data-filter="0" style="display: none;"> 处理</option>
                              <option value="0" data-filter="0"> 显示全部</option>
                            <?php foreach($type as $val):?>
                                <?php if($val['type'] == 3):?>
                                    <option value="<?php echo $val['id'];?>" data-filter="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
                                <?php endif;?>
                            <?php endforeach;?>
                        </select>
                    </li>
                </ul>

                <ul class="filtr_container" id="application">
                    <?php if($application):?>
                    <?php foreach($application as $val):?>
                        <li class="filtr-item" data-category="1, 5">
                            <a href="/Applications/{$val.uname}-{$val.id}.html" class="filtr_nav am">
                                <div class="pic am">
                                    <div class="pic_img am">
                                        <img src="{$val.cover_url}" alt="{$val.alt}" title="{$val.alt}" style="height: 190px;">
                                    </div>
                                    <div class="open_item am">
                                        <p class="more capital">更多细节<i class="iconfont icon-changjiantou-copy"></i></p>
                                    </div>
                                </div>
                                <p class="title am"><?php echo $val['name'];?></p>
                            </a>
                        </li>
                    <?php endforeach;?>
                    <?php endif;?>
                </ul>
            </div>
            <input type="hidden" name="type1" value="0">
            <input type="hidden" name="type2" value="0">
            <input type="hidden" name="type3" value="0">
        </div>
    </div>


    {include file="public/footer" /}
    <script type="text/html" id="application_box">
        <li class="filtr-item" data-category="1, 5">
            <a href="{{view_url}}" class="filtr_nav am">
                <div class="pic am">
                    <div class="pic_img am" >
                        <img src="{{img_url}}" alt="" title="" style="height: 190px;">
                    </div>
                    <div class="open_item am">
                        <p class="more capital">更多细节<i class="iconfont icon-changjiantou-copy"></i></p>
                    </div>
                </div>
                <p class="title am">{{name}}</p>
            </a>
        </li>
    </script>
<script type="text/javascript">
    $(function() {
        $('.filtr_container').filterizr();
    });

    var _application = function (obj) {
          var index = $(obj).attr('data-index');
          $("input[name='"+index+"']").val($(obj).val());

          var data = {
              type1:$("input[name='type1']").val(),
              type2:$("input[name='type2']").val(),
              type3:$("input[name='type3']").val()
          };
        _request(data);
    };

    var _request = function (data) {
        $.ajax({
            type: 'post',
            url: '/home/Applications/getApplication',
            data: data,
            dataType: "json",
            success: function(res){
                if(res.data && res.data.length >= 1){
                    $("#application").empty();
                    $.each(res.data, function () {
                        var $box = $("#application_box").html();
                        $box = $box.replace("{{view_url}}", '/Applications/'+this.uname+'-'+this.id+'.html');
                        $box = $box.replace("{{img_url}}", this.img_url_site);
                        $box = $box.replace("{{name}}", this.name);
                        $("#application").append($box);
                    });
                    $('.filtr_container').filterizr();
                } else {
                    $("#application").html('<span style="text-align: center;width: 100%;display: inline-block">No Data Now</span>');
                }
            }
        });
    }
</script>
